# 1、回文
# lst = input("请输入：")
# if lst == lst[::-1]:
#     print("输入为回文")
# else:
#     print("输入非回文")

# 2、找出出现次数过半元素
# lst = list(input("请输入："))
# for index, value in enumerate(lst):
#     if lst.count(value) > len(lst) / 2:
#         print(f"列表中出现次数过半的元素是{value}")
#         break
#     elif index == len(lst)//2 :
#         print("没有出现次数过半的元素")
#         break

# 3、输出最小回文

# input_lst = list(input("请输入："))
# two_lst = [input_lst, input_lst[::-1]]
# print(two_lst)
# for lst in two_lst:
#     for index, value in enumerate(lst):
#         if lst != lst[::-1]:
#             if index == 0:
#                 lst.append(value)
#             else:
#                 lst.insert(-index,value)
#         # elif index == len(lst) - 1:
#         #     break
# if len(two_lst[0]) < len(two_lst[1]) or two_lst[0] == two_lst[1]:
#     print(f"最小回文:{two_lst[0]}")
# elif len(two_lst[0]) > len(two_lst[1]):
#     print(f"最小回文:{two_lst[1]}")
# else:
#     print(f"最小回文:{two_lst[0]};{two_lst[1]}")


# 4、送礼
# from random import choice
# send_lst = ['员工a','员工b','员工c','员工d','员工e','员工f']
# get_lst = ['员工a','员工b','员工c','员工d','员工e','员工f']
# for i in send_lst:
#     while True:
#         j = choice(get_lst)
#         if i != j:
#             get_lst.remove(j)
#             print(f"送礼:{i} --> 收礼:{j}")
#             break
#         elif i == j == send_lst[-1]:
#             print("这题不会")
#             break
#         else:
#             continue

# import random
# send_lst = ['员工a','员工b','员工c','员工d','员工e','员工f']
# get_lst = send_lst[:]
#
# for i in send_lst:
#     flag = 0
#     if i in get_lst:
#         flag = 1
#         get_lst.remove(i)
#     get = random.choice(get_lst)
#     get_lst.remove(get)
#     if flag == 1:
#         get_lst.append(i)
#     print(f"{i}-->{get}")

# a = input("请输入:")
# b = list(a)
# c = b[::-1]
# for i in range(len(b)) :
#         d = b[0:(len(b)-i)]
#         e = c[0:]
#         if d == d[::-1] :
#             g = c[0:i]
#             f = g + b
#             print(f"最小回文是:{f}")
#             break

# s = "noo"
# m = 0
# res = s[::-1]  #cba
# while s[m:len(s)] != res[0:len(res)-m] and m < len(s):
#     m+=1
# print(s+res[len(s) -m: ])


# a = input("请输入：")
# b = a[0:-1]
# print(a+b[::-1])
# print(c)